//
//  ImageCompress.h
//  ssy
//
//  Created by 李志权 on 15/7/21.
//  Copyright (c) 2015年 深圳时时医科技有限公司. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ImageCompress : NSObject

/** 压缩成指定大小代码*/
+ (UIImage*)scaleToSize:(UIImage *)img size:(CGSize)size;

/** 根据指定宽压缩*/
+ (UIImage*)imageCompressForWidth:(UIImage*)sourceImage targetWidth:(CGFloat)defineWidth;

/** 根据指定宽高压缩*/
+ (UIImage*)imageCompressForSize:(UIImage*)sourceImage targetSize:(CGSize)size;

/** 根据宽度等比例压缩*/
+ (UIImage *)imageCompressForWidths:(UIImage*)sourceImage targetWidth:(CGFloat)defineWidth;

/** 根据宽高最大的一方自动压缩，*/
+ (UIImage *)imageCompressForAuto:(UIImage *)sourceImage targetWidth:(CGFloat)defineWidth;

/** 旋转图片*/
+ (UIImage *)rotateImage:(UIImage *)image rotation:(UIImageOrientation)orientation;
//压缩图片至100k以下
+(NSData *)imageData:(UIImage *)myimage;
/**已宽度等比压缩尺寸*/
+(UIImage *)fixToFillScreenWithImage:(UIImage *)image width:(CGFloat)width;

@end
